{extend name='main'}

{block name="button"}
{/block}

{block name="content"}
<div class="layui-badge think-bg-violet text-left notselect block shadow margin-0 padding-10 padding-left-20 border-radius-5 font-s15">
    特别注意：APP配置数据请勿随意修改，若要求管理出现变动，请联系技术员。
</div>
<div class="think-box-shadow">
    <div class="layui-tab layui-tab-card think-bg-white">
        <ul class="layui-tab-title">
            {foreach
            ['wechat'=>'微信配置','wepay'=>'支付配置','sms'=>'短信配置','property_fee'=>'物业费基础配置'] as $k=>$v}
            {if isset($type) and $type eq $k}
            <li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}</li>
            {else}
            <li data-open="{:url('index')}?type={$k}">{$v}</li>
            {/if}{/foreach}
        </ul>
        <div class="layui-tab-content">
            {include file='system/search'}
            <table id="BaseData" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
        </div>
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th width="5%" class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th width="10%" class='text-center nowrap'>类型</th>
                <th width="20%" class='text-center nowrap'>字段</th>
                <th width="60%" class='text-center nowrap'>值</th>
                <th width="60%" class='text-center nowrap'>描述</th>
                <th width="10%" class='text-center nowrap'>操作</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
                </td>
                <td class="text-center nowrap">{$vo.type|default=""}</td>
                <td class="text-center nowrap">{$vo.name|default=""}</td>
                <td class="text-center nowrap">
                    <!--{if in_array($vo.name, ["icon", "attract"])}-->
                    <img width="120" height="100" src='{$vo.value|default=""}' alt=""/>
                    <!--{else}-->
                    {$vo.value|getSubstr="100"}
                    <!--{/if}-->
                </td>
                <td class="text-center nowrap">{$vo.description|default=""}</td>
                <td class="text-center nowrap">
                    <!--{if auth('edit')}-->
                    <a class="layui-btn layui-btn-sm" data-modal="{:url('edit')}?id={$vo.id}" data-title="编辑"
                       data-dbclick data-value="id#{$vo.id}" data-csrf="{:systoken('edit')}">编辑</a>
                    <!--{/if}-->
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
    </div>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>

{/block}